package cn.hxzy.common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Pattern;


/**
 * <p>
 *
 * </p>
 *
 * @author zhaoge
 * @since 2024-06-22
 */
@Getter
@Setter
@TableName("sys_user")
@ApiModel(value = "User对象", description = "")
@Data
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("密码")
    private String userPass;

    @ApiModelProperty("身份证")
    private String userCard;

    @ApiModelProperty("学校id")
    private Integer schoolId;

    @ApiModelProperty("邮箱")
    private String userEmail;

    @ApiModelProperty("手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String userPhone;

    @ApiModelProperty("性别")
    private String userSex;

    @ApiModelProperty("头像")
    private String userAvatar;

    @ApiModelProperty("用户类型")
    private String userType;

    @ApiModelProperty("用户状态")
    private String userStatus;
    /*
     * 老师的专业id
     * */
    @TableField(exist = false)
    private Integer majorId;

    /*
     * 老师教研组id
     * */
    @TableField(exist = false)
    private Integer teacheringResearchId;
}
